/* ========== 标题和按钮的水平布局 ========== */
.header-bar {
    text-align: center;
    padding: 10px 0;
    margin-bottom: 10px;
    width: 100%;
    position: relative;/*为绝对定位提供参考*/
}

.header-bar h2 {
    margin: 0;
    font-size: 1.5em;
    color: #333;
    display: inline-block; /* 可选：避免 margin 影响居中 */
}

/* 创建按钮样式 */
.upload {
    position: absolute;
    top: 10px;
    right: 0;
    background-color: #1a73e8;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.upload:hover {
    background-color: #1967d2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}


/*
上传文件的部分
*/
.hidden {
    display: none;
}

.custom-file-button {
    position: absolute;
    right: 0;
    top: 10%;
    background-color: #f0f0f0;
    color: dodgerblue;
    border: none;
    padding: 10px 16px;
    margin: 20px 0;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 120px;
}

.custom-file-button:hover {
    background-color: dodgerblue;
     color: #f0f0f0;
}

#fileName{
    margin-top: 10px;
    font-weight: bold;
    position: absolute;
    right: 0;
    top: 120%;
}

.file-upload-btn{
    position: absolute;
    right: 0;
    top: 150%;
    background-color: #1a73e8;
    color: white;
    border: none;
    padding: 10px 16px;
    margin: 20px 0;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 120px;
}

.cancel-upload-btn{
    position: absolute;
    right: 0;
    top: 240%;
    background-color: #ec0909;
    color: #f5f9fd;
    border: none;
    padding: 10px 16px;
    margin: 20px 0;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 120px;
}


/*文件处理任务列表*/
:root {
    --primary: #3498db;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
    --light: #f8f9fa;
    --dark: #343a40;
    --gray: #6c757d;
}

.status-container {
    background-color: var(--light);
    border-radius: 12px;
    padding: 20px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.status-header {
    display: grid;
    grid-template-columns: 50px 1fr 120px;
    padding: 15px 10px;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 2px solid #eaecef;
    margin-bottom: 10px;
}

.function-item {
    display: grid;
    grid-template-columns: 50px 1fr 120px;
    align-items: center;
    padding: 15px 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background-color 0.3s;
}

.function-item:nth-child(odd) {
    background-color: #f1f8ff;
}

.function-item:hover {
    background-color: #ebf5fb;
}

.status-indicator {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.status-pending {
    background-color: #ecf0f1;
    border: 2px solid #bdc3c7;
    color: var(--gray);
}

.status-running {
    border: 2px solid var(--primary);
    animation: spin 1s linear infinite;
    color: var(--primary);
}

.status-done {
    background-color: var(--success);
    color: white;
}

.function-name {
    font-size: 16px;
    color: var(--dark);
    font-weight: 500;
}

.status-text {
    font-size: 14px;
    font-weight: 500;
    text-align: right;
    padding-right: 10px;
}

.pending-text {
    color: var(--gray);
}

.running-text {
    color: var(--primary);
}

.done-text {
    color: #27ae60;
}

.status-processing {
    background-color: #d6eaf8;
    color: #2874a6;
}

.status-completed {
    background-color: #d5f5e3;
    color: #1d8348;
}





/* 文件列表容器 */
.file-list-container {
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
}

/* 每个文件项 */
.file-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s;
}

.file-item:hover {
    background-color: #f9f9f9;
}

/* 图标区域 */
.file-icon {
    flex: 0 0 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.file-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* 文件信息区域 */
.file-info {
    flex: 1;
    min-width: 0; /* 防止文本溢出 */
}

.file-name {
    font-weight: 500;
    color: #1a73e8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.file-meta {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* 操作按钮区域 */
.file-actions {
    flex: 0 0 180px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.file-actions a,
.file-actions button {
    flex: 1;
    max-width: 80px;
    padding: 6px 8px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    color: white;
    text-align: center;
}

.btn-detail {
    background-color: #1a73e8;
}

.btn-detail:hover {
    background-color: #1967d2;
}

.btn-delete {
    background-color: #e74c3c;
}

.btn-delete:hover {
    background-color: #c0392b;
}

/* 无数据提示 */
.no-data {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 30px;
}


/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    font-size: 14px;
}

.pagination .page-info {
    color: #555;
}

.pagination .btn-page {
    padding: 6px 12px;
    background-color: #1a73e8;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: background-color 0.2s;
}

.pagination .btn-page:hover:not(.disabled) {
    background-color: #1967d2;
}

.pagination .btn-page.disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.pagination .btn-page.disabled:hover {
    background-color: #ccc;
}